The present invention relates generally to the field of test scripts, and more specifically, to automatic identification of subroutines from test scripts.
Software testers record test scripts from a program under test such as a web application, and perform them on a regular basis. Recording a test script involves running the program under test, doing actions on it, and generating an instruction for each action. This may be done using standard testing tools. There is a one to one correspondence between the actions on the program, and the instructions in a test script. Recorded test scripts may need to be modified later because a certain feature of the program can be changed. In this case, the script may need to be re-recorded, although some testing tools allow editing of the scripts.
Editing of the test scripts may be manual, and quite labor intensive if a tester maintains a large number of scripts. As a result, a small change of the program may affect a large number of scripts and will require manual modification/re-recording of all those scripts. A similar problem arises when a tester decides to change/update test conditions in previously recorded test scripts. This is often the case when testers need to maintain scripts for a long period. However, this may need to be done manually for each script.
Use of subroutines can mitigate such problems. However, the tester has to define the subroutines manually after recording each test script. This may be a labor intensive process. Moreover, if a new subroutine is defined after test scripts have been created, a tester has to manually make the same change to each test script. For any addition or removal of subroutines, this has to be done manually, which makes the work of the tester difficult.
Hence, there is a need for a more efficient system and method for automatic identification of subroutines from test scripts.